package com.lzp.entity;

import java.io.Serializable;
import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李智鹏
 * @since 2025-01-07
 */
@Data
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer sid;

    private String sname;

    private String sex;

    private Integer age;

    private String addr;

    private Integer cid;

    @TableField(exist = false)//该字段并不存在原生学生表中需设置改字段
    private String cname;

    @TableLogic//逻辑删除字段
    private Integer deleted;

    //自动填充配置
    @TableField(fill = FieldFill.INSERT)//插入时候填充用户创建时间
    private LocalDate createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)//插入和修改时候填充修改时间
    private LocalDate updateTime;

}





















